<template>
  <div id="app">
    <!-- <div id="main" style="width: 600px;height:400px;"></div> -->
    <div style="width:100vw;height:100vh">
      <div id="main" style="width:100%;height:100%;"></div>
    </div>
  </div>
</template>
<script>
  import purple from './assets/dark.json'
export default {
  mounted() {
    // this.$echarts.registerTheme('purple', purple);
    // var myChart = this.$echarts.init(document.getElementById("main"), purple, {
    //   // width: '700',
    //   // height: "700",
    // });
    var myChart=this.$myChart('main')
    window.onresize = function () {
      myChart.resize();
    };
    myChart.setOption({
      title: {
        text: "ECharts 入门示例",
      },
      tooltip: {},
      xAxis: {
        data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"],
      },
      yAxis: {},
      series: [
        {
          name: "销量",
          type: "bar",
          data: [5, 20, 36, 10, 10, 20],
        },
      ],
    });
  },
};
</script>
<style lang="scss">
</style>
